package com.acsior.hibernate.vo;

// default package

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * @author mdimitrova@acsior.com - 29.02.2012
 */
@Entity
@Table(name = "sec_log")
@GeneratorKey(tableName = "sec_log")
public class SecurityLogVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -4574189961023459581L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "action_employee_id", nullable = false)
	private EmployeeVO actionUser;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "affected_employee_id")
	private EmployeeVO affectedUser;

	@Column(name = "action_description")
	private String actionDescription;

	@Column(name = "action_date", length = 23, nullable = false)
	private Date actionDate;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "affected_group_id")
	private SecGroupVO affectedGroup;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_security_action_types_id", nullable = false)
	private NomSecurityActionTypeVO actionType;

	/**
	 * Конструктор
	 */
	public SecurityLogVO() {
		super();
	}

	/**
	 * @return actionUser
	 */
	public EmployeeVO getActionUser() {
		return this.actionUser;
	}

	/**
	 * @param actionUser
	 */
	public void setActionUser(EmployeeVO actionUser) {
		this.actionUser = actionUser;
	}

	/**
	 * @return affectedUser
	 */

	public EmployeeVO getAffectedUser() {
		return this.affectedUser;
	}

	/**
	 * @param affectedUser
	 */
	public void setAffectedUser(EmployeeVO affectedUser) {
		this.affectedUser = affectedUser;
	}

	/**
	 * @return actionDescription
	 */

	public String getActionDescription() {
		return this.actionDescription;
	}

	/**
	 * @param actionDescription
	 */
	public void setActionDescription(String actionDescription) {
		this.actionDescription = actionDescription;
	}

	/**
	 * @return actionDate
	 */

	public Date getActionDate() {
		return this.actionDate;
	}

	/**
	 * @param actionDate
	 */
	public void setActionDate(Date actionDate) {
		this.actionDate = actionDate;
	}

	/**
	 * @return affectedGroup
	 */

	public SecGroupVO getAffectedGroup() {
		return this.affectedGroup;
	}

	/**
	 * @param affectedGroup
	 */
	public void setAffectedGroup(SecGroupVO affectedGroup) {
		this.affectedGroup = affectedGroup;
	}

	/**
	 * @return actionType
	 */

	public NomSecurityActionTypeVO getActionType() {
		return this.actionType;
	}

	/**
	 * @param actionType
	 */
	public void setActionType(NomSecurityActionTypeVO actionType) {
		this.actionType = actionType;
	}

}